// =====================================================================
//
//  This file is part of the Microsoft Dynamics CRM SDK code samples.
//
//  Copyright (C) Microsoft Corporation.  All rights reserved.
//
//  This source code is intended only as a supplement to Microsoft
//  Development Tools and/or on-line documentation.  See these other
//  materials for detailed information regarding Microsoft code samples.
//
//  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//
// =====================================================================
using System;
using System.Runtime.Serialization;

namespace Microsoft.Xrm.Sdk.Metadata
{
	[DataContract(Name = "BigIntAttributeMetadata", Namespace = XmlNamespaces.V5.Metadata)]
	public sealed class BigIntAttributeMetadata : AttributeMetadata
	{
		#region Constants
		public const Int64 MinSupportedValue = Int64.MinValue;
		public const Int64 MaxSupportedValue = Int64.MaxValue;
		#endregion

		#region Fields
		private Int64? _maxValue;
		private Int64? _minValue;
		#endregion

		#region Constructors
		public BigIntAttributeMetadata()
			: this(null)
		{
		}

		public BigIntAttributeMetadata(string schemaName)
			: base(AttributeTypeCode.BigInt, schemaName)
		{
		}
		#endregion

		#region Properties
		/// <summary>
		/// Required for CreateAttribute
		/// Valid for UpdateAttribute
		/// </summary>
		[DataMember]
		public Int64? MaxValue
		{
			get { return this._maxValue; }
			internal set { this._maxValue = value; }
		}

		/// <summary>
		/// Required for CreateAttribute
		/// Valid for UpdateAttribute
		/// </summary>
		[DataMember]
		public Int64? MinValue
		{
			get { return this._minValue; }
			internal set { this._minValue = value; }
		}
		#endregion
	}
}
